<html>
    <head>
        <title>Reporte Vehiculos mas rentados</title>
        <?php
        include_once("../control/ControlAlquiler.php");
        session_start();
        /*
         * To change this template, choose Tools | Templates
         * and open the template in the editor.
         */
        $cAlquiler = new ControlAlquiler();
        $cAlquiler->getReporteTopTipoVehiculo();
        $arAlquileres = $_SESSION['arAlquileres'];
        ?>
        <script type="text/javascript" src="<?php dirname(__FILE__) ?>/alquilerdonquijote/js/jquery.js"></script>
        <script type="text/javascript" src="<?php dirname(__FILE__) ?>/alquilerdonquijote/js/jquery-validate/jquery.validate.js"></script>
        <script type="text/javascript" src="<?php dirname(__FILE__) ?>/alquilerdonquijote/js/jquery-ui-1.8.5.custom.min.js"></script>
        <script type="text/javascript" src="<?php dirname(__FILE__) ?>/alquilerdonquijote/js/jquery.dataTables.js"></script>
        <script type="text/javascript" src="<?php dirname(__FILE__) ?>/alquilerdonquijote/js/ColReorder.js"></script>
        <script type="text/javascript" src="<?php dirname(__FILE__) ?>/alquilerdonquijote/js/scripts.js"></script>

        <link rel="stylesheet" type="text/css" media="screen" href="<?php dirname(__FILE__) ?>/alquilerdonquijote/css/estilo.css" />
<!--            <link rel="stylesheet" type="text/css" media="screen" href="<?php dirname(__FILE__) ?>/alquilerdonquijote/css/start/jquery-ui-1.8.5.custom.css" />	-->
        <!--<link rel="stylesheet" type="text/css" media="screen" href="<?php dirname(__FILE__) ?>/alquilerdonquijote/css/styles.css"  type="text/css" />-->
        <link rel="stylesheet" type="text/css" media="screen" href="<?php dirname(__FILE__) ?>/alquilerdonquijote/css/demo_table_jui.css"  type="text/css" />
        <link rel="stylesheet" type="text/css" media="screen" href="<?php dirname(__FILE__) ?>/alquilerdonquijote/css/smoothness/jquery-ui-1.8.4.custom.css"  type="text/css" />
        <link rel="stylesheet" type="text/css" media="screen" href="<?php dirname(__FILE__) ?>/alquilerdonquijote/css/ColReorder.css"  type="text/css" />

        <script type="text/javascript"  lang="javascript" >
            //$(document).ready(function(){
            //   $("#new").click(function() {
            //       $("#title h1").html("Crear Aoutomovil");
            //     $("#automoviles").load("VistaAutomoviles_datos.php");
            // });
            // });
            $(document).ready( function () {
                var oTable = $('#tablaAlquileres').dataTable( {
                    "sDom": 'R<"H"lfr>t<"F"ip>',
                    "bJQueryUI": true,
                    "sPaginationType": "full_numbers",
                    "bPaginate": true,
                    "bLengthChange": true,
                    "bFilter": true,
                    "bSort": true,
                    "bInfo": true,
                    "bAutoWidth": true,
                    "aaSorting": [[ 0, "desc" ]]
                } );
            } );
        </script>
    </head>
    <body>
        <h1 style="padding-left: 10px;">Reporte vehiculos m&aacute;s alquilados</h1>
            <div style="width: 550px; padding-left: 20px;">
                <table id="tablaAlquileres" class="tabla_datos_reporte">
                    <thead>
                        <tr>
                            <th scope="col">Cantidad Alquileres</th>
                            <th scope="col">Tipo Vehiculo</th>
                        </tr>
                    </thead>
                    <tbody>

                        <?php
                        if ($arAlquileres != null) {
                            foreach ($arAlquileres as $oAlquiler) {
                                ?>
                                <tr>
                                    <td><?php echo $oAlquiler->cantidad ?></td>
                                    <td><?php echo $oAlquiler->tipovehinombre ?></td>
                                </tr>
                                <?php
                            }
                        }
                        ?>
                    </tbody>

                </table>
            </div>
    </body>
</html>